package com.lili.store.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class DateUtils {

    /**
     * 获取系统年月  如 202307
     *
     * @return
     */
    public static String getYm() {
        LocalDate localDate = LocalDate.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yMM");
        String ym = localDate.format(formatter);
        return ym;
    }


    public static void main(String[] args) {
        System.out.println(getYm());
    }
}
